#include "bits/stdc++.h"
#include <ros/ros.h>
#include <std_msgs/Float32MultiArray.h>
#include "Calculator.h"

using namespace std;

int main(int argc, char** argv)
{
    ros::init(argc, argv, "vel_pos_calculator");
    ros::NodeHandle nh;

    Calculator calculator(nh);

    ros::Subscriber net_sub = nh.subscribe<std_msgs::Float64MultiArray>("/icml/deepsort", 10, boost::bind(&Calculator::feed, &calculator, _1));

    // wait for connection
    ros::Rate rate(20.0);

    // wait for FCU connection
    while ( ros::ok() ) {



        static int cnt = 0;
        if ( cnt == 10 ) {


            cnt = 0;
        }
        cnt++;

        ros::spinOnce();
        rate.sleep();
    }

    return 0;
}